

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>
    <script>
        
        function getLevel(num) {
            if (num <= 100 && num > 90) {
                return 'A';
            } else if (num > 80) {
                return 'B';
            } else if (num > 70) {
                return 'C';
            } else {
                return 'D';
            }
        }

        console.log(getLevel(66));

    </script>
</body>

</html>